# Maintainer: David Runge <dvzrv@archlinux.org>

_name=jaraco.logging
pkgname=python-jaraco.logging
pkgver=3.2.0
pkgrel=1
pkgdesc="Quickly solicit log level info from command-line parameters"
arch=(any)
url="https://github.com/jaraco/jaraco.logging"
license=(MIT)
depends=(
  python
  python-tempora
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-setuptools-scm
  python-toml
  python-wheel
)
conflicts=(python-jaraco)
replaces=(python-jaraco)
source=($_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
sha256sums=('4208fb9235cd75fcf71b8741324d3ad6697870b8f9c4fa615d84bd197d455014')
b2sums=('eec9ebc4a8656a698d06c6613b84a236205e452b0b8acbb75633fc8849bf4ec30ad3e1e356e744feb9fb5a33c044bb8433c96feb588f0b38cb96035a0198e596')

build() {
  cd $_name-$pkgver
  SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
}

check() {
  cd $_name-$pkgver
  # NOTE: there are actually no tests to run
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 *.rst -t "$pkgdir/usr/share/doc/$pkgname/"
}
